﻿<%@ Page Language="C#" MasterPageFile="~/personal-accident/proposalforms/PersonalAccidentProposalMasterPage.master"
    Async="true" AutoEventWireup="true" CodeFile="etiqa_proposal_form.aspx.cs" Inherits="personal_accident_proposalforms_etiqa_proposal_form" %>

<%@ Register Src="~/controls/usrNoJS.ascx" TagName="usrNoJS" TagPrefix="ucNoJS" %>
<%@ Register Src="~/controls/usrPhoneNo.ascx" TagName="usrPhoneNo" TagPrefix="uc1" %>
<%@ Register Src="~/controls/usrDate.ascx" TagName="usrDate" TagPrefix="uc2" %>
<%@ Register Src="~/controls/usrIdNumber.ascx" TagName="usrIdNumber" TagPrefix="uc3" %>
<%@ Register Src="~/controls/usrNationality.ascx" TagName="usrNationality" TagPrefix="uc4" %>
<%@ Register Src="~/controls/usrSalutation.ascx" TagName="usrSalutation" TagPrefix="uc5" %>
<%@ Register Src="~/controls/usrMaritalStatus.ascx" TagName="usrMaritalStatus" TagPrefix="uc6" %>
<%@ Register Src="~/controls/usrGender.ascx" TagName="usrGender" TagPrefix="uc7" %>
<%@ Register Src="~/controls/usrRelationship.ascx" TagName="usrRelationship" TagPrefix="uc9" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div runat="server" id="divAgentRequest" visible="false">
        <asp:Label ID="lblPAId" runat="server" />
        <asp:Label ID="lblCustomerId" runat="server" />
        <asp:Label ID="lblCarResultId" runat="server" />
        <asp:Label ID="lblProviderCompanyId" runat="server" />
        <asp:Label ID="lblCarMoreDetailId" runat="server" />
        <asp:Label ID="lblCustomerGivenName" runat="server" />
        <asp:Label ID="lblCustomerMobileNo" runat="server" />
    </div>
    <div id="container">
        <div id="nav_top">
            <div class="left pad_8yr">
              <asp:ImageButton ID="imgbtnBackTop" runat="server" ImageUrl="/images/forms_proposal/button/back.png"
                    OnClick="imgbtnBackTop_Click" OnClientClick="return confirm('Are you sure to go back?');" />
               <%-- <a href="/personal-accident/results.aspx" onclick="return confirm('Are you sure to go back?');">
                    <img src="/images/forms_proposal/button/back.png" alt="Back" /></a>--%></div>
            <div class="right pad_8yr">
                <img src="/images/forms_proposal/nav/logo_comparexpress.png" alt="CompareXpress" /></div>
        </div>
        <ucNoJS:usrNoJS ID="usrNoJS1" runat="server" />
        <!-- #Include file="../../includes/body_loader.inc" -->

        <script type="text/javascript">
            IncreaseProgress(5);
        </script>

        <div id="divContent" style="display: none">
            <div id="contentBody">
                <div id="header">
                    <div class="seperator">
                    </div>
                    <div class="right" style="width: 240px">
                        <div class="quotesum_button">
                            <img src="/images/forms_proposal/button/quotesum.png" width="240" height="73" alt="Quote Summary" /></div>
                    </div>
                    <h1>
                        Online Personal Accident Proposal Form -
                        <asp:Label ID="lblProvider" runat="server"></asp:Label></h1>
                    <asp:Label ID="lblAgentName" runat="server" />
                    <div class="seperator">
                    </div>
                    <div class="quotesum">
                        <div class="top">
                        </div>
                        <div id="divQuoteSummery" class="body pad_15x">
                            <!-- QUOTE SUMMARY | Start -->
                            <div class="w21per left pad_25xr">
                                <h1>
                                    <asp:Label ID="lblPlanHead" runat="server" Text="Plan Name : "></asp:Label></h1>
                                <p>
                                    <asp:Label ID="lblPlanName" runat="server"></asp:Label></p>
                            </div>
                            <div class="w21per left pad_25xr">
                                <h1>
                                    <asp:Label ID="lblPolicyHead" runat="server" Text="Policy Type : "></asp:Label></h1>
                                <p>
                                    <asp:Label ID="lblPolicyType" runat="server"></asp:Label></p>
                            </div>
                            <div class="w21per left pad_25xr">
                                <h1>
                                    <asp:Label ID="lblPremiumHead" runat="server" Text="Annual Premium  : $"></asp:Label></h1>
                                <p>
                                    <asp:Label ID="lblAnnualPremium" runat="server"></asp:Label>
                                    (+ GST 7%)</p>
                            </div>
                            <!-- QUOTE SUMMARY | End   -->
                        </div>
                        <div class="bottom">
                        </div>
                    </div>
                </div>
                <div class="seperator">
                </div>
                <div id="body">
                </div>
                <div id="divValidationSummary">
                    <asp:ValidationSummary ID="vsproposal" runat="server" CssClass="errorSummary" ValidationGroup="proposal"
                        HeaderText="Oops please complete the form" />
                </div>
                <div style="display: none">
                    <asp:TextBox ID="txtPolicyType" runat="server"></asp:TextBox>
                    <asp:Label ID="lblCompanyId" runat="server"></asp:Label>
                </div>
                <div class="form">
                    <div class="top">
                        <div class="left">
                            <div class="pad_10t pad_35xl white">
                                Online Personal Accident Proposal Form</div>
                        </div>
                        <div class="right">
                        </div>
                    </div>
                    <div class="body">
                        <div class="inner">
                            <div class="pad_20x10y">
                                <div class="norm">
                                    <div class="top_t">
                                    </div>
                                    <div class="body">
                                        <div class="pad_15x">
                                            <p>
                                                <b>Important Notice:</b><br />
                                                Pursuant to Section 25(5) of the Insurance Act (Cap142) (or any subsequent amendment thereof). You are to disclose in this proposal form, fully and faithfully, all facts which you know or ought to know, otherwise the policy issued hereunder may be void. 
                                                This insurance will not be in forced until the proposal has been accepted by the Company. This Proposal is not a contract of insurance. Please refer to the policy (which will be issued to you upon acceptance of your application 
                                                and payment of the premium) for its exclusions and complete details of coverage.
                                            </p>
                                            <br />
                                            <p><b>Policy Owners’ Protection Scheme</b> <br/> This policy is protected under the Policy Owners’ Protection Scheme which is administered by the Singapore Deposit Insurance
           Corporation (SDIC). Coverage for your policy is automatic and no further action is required from you. For more information on the types of benefits
           that are covered under the scheme as well as the limits of coverage, where applicable, please contact your insurer or visit the GIA / LIA or SDIC 
            websites (<a href='http://www.gia.org.sg' target='_blank' >www.gia.org.sg</a> or <a href='http://www.lia.org.sg' target='_blank'>www.lia.org.sg</a> or <a href='http://www.sdic.org.sg' target='_blank'>www.sdic.org.sg</a>).
                                            </p>
                                        </div>
                                    </div>
                                    <div class="bottom">
                                    </div>
                                </div>
                                <div class="seperator">
                                </div>
                                <div class="hilite">
                                    <div class="top">
                                    </div>
                                    <div class="body_in pad_15x">
                                        <h1>
                                            Proposer's Information</h1>
                                        <div class="seperator">
                                        </div>
                                        <div class="w43per left">
                                            <div id="divName">
                                                <div class="w180 left align_right pad_6t pad_7xr">
                                                    <span class="red">*</span> Name:</div>
                                                <div class="left">
                                                    <asp:TextBox ID="txtName" MaxLength="50" runat="server" size="25"></asp:TextBox>&nbsp;
                                                    <asp:RequiredFieldValidator ID="rfvName" runat="server" CssClass="validationErrorControl"
                                                        ErrorMessage="" ValidationGroup="proposal" ControlToValidate="txtName"></asp:RequiredFieldValidator>
                                                    <asp:RegularExpressionValidator ID="revName" runat="server" ControlToValidate="txtName"
                                                        ValidationExpression="^[a-zA-Z''-'\s]{1,50}$" ValidationGroup="proposal" CssClass="validationErrorControl"
                                                        Text="" ErrorMessage=""></asp:RegularExpressionValidator>
                                                </div>
                                            </div>
                                            <div class="h10">
                                            </div>
                                            <div>
                                                <div class="w180 left align_right pad_6t pad_7xr">
                                                    <span class="red">*</span> Gender:</div>
                                                <div class="left">
                                                    <uc7:usrGender ID="ddlGender" ValidationGroup="proposal" IsEnabled="true" ErrorMessage=""
                                                        runat="server" />
                                                </div>
                                            </div>
                                            <div class="h10">
                                            </div>
                                            <div id="divNRICNo">
                                                <div class="w180 left align_right pad_6t pad_7xr">
                                                    <span class="red">*</span> NRIC Number:</div>
                                                <div class="left">
                                                    <uc3:usrIdNumber ID="ddlIdNumber" runat="server" ValidationGroup="proposal" />
                                                </div>
                                            </div>
                                            <div class="h10">
                                            </div>
                                            <div id="divNationality">
                                                <div class="w180 left align_right pad_6t pad_7xr">
                                                    <span class="red">*</span> Nationality:</div>
                                                <div class="left">
                                                    <uc4:usrNationality ID="ddlNationality" runat="server" ErrorMessage="" ValidationGroup="proposal" />
                                                </div>
                                            </div>
                                            <div class="h10">
                                            </div>
                                            <div id="divAEmail">
                                                <div class="w180 left align_right pad_6t pad_7xr">
                                                    <span class="red">*</span> E-mail:</div>
                                                <div class="left">
                                                    <asp:TextBox ID="txtEmail" MaxLength="50" runat="server" size="25"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="rfvEmail" runat="server" CssClass="validationErrorControl"
                                                        ErrorMessage="" ValidationGroup="proposal" ControlToValidate="txtEmail" Display="Dynamic"></asp:RequiredFieldValidator>
                                                    <asp:RegularExpressionValidator ID="revEmail" runat="server" CssClass="validationErrorControl"
                                                        ErrorMessage="" ValidationGroup="proposal" ControlToValidate="txtEmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="w56per left">
                                           <%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                                <ContentTemplate>--%>
                                                    <div id="divPostCode">
                                                        <div class="w180 left align_right pad_6t pad_7xr">
                                                            <span class="red">*</span> Postcode:
                                                        </div>
                                                        <asp:TextBox ID="txtPostCode" size="8" onkeypress="restrictToNumbers(event)" runat="server" MaxLength="6" Width="80px"></asp:TextBox>
                                                      <%--  <asp:ImageButton ID="ibtPostCode" runat="server" CssClass="button" align="absmiddle"
                                                            OnClick="ibtPostCode_Click" Width="108" ValidationGroup="PostCode" AlternateText="Get Address"
                                                            ImageUrl="~/images/forms_proposal/button/getaddress.png" />
                                                        <asp:UpdateProgress runat="server" ID="uplUpProgress" DisplayAfter="500">
                                                            <ProgressTemplate>
                                                                <span style="position: absolute; text-align: right; width: 390px;">
                                                                    <img src="../../images/loading7.gif" id="ldPostCode" alt="loading" />
                                                                </span>
                                                            </ProgressTemplate>
                                                        </asp:UpdateProgress>--%>
                                                        <asp:RequiredFieldValidator ID="rfvPCode" runat="server" CssClass="validationErrorControl"
                                                            Display="Dynamic" ErrorMessage="" ValidationGroup="PostCode" ControlToValidate="txtPostCode"></asp:RequiredFieldValidator>
                                                        <asp:RegularExpressionValidator ID="revPCode" runat="server" CssClass="validationErrorControl"
                                                            Display="Dynamic" ErrorMessage="" ValidationGroup="PostCode" ValidationExpression="[0-9]{6}"
                                                            ControlToValidate="txtPostCode"></asp:RegularExpressionValidator>
                                                        <asp:RequiredFieldValidator ID="rfvPostCode" runat="server" CssClass="validationErrorControl"
                                                            Display="Dynamic" ErrorMessage="" ValidationGroup="proposal" ControlToValidate="txtPostCode"></asp:RequiredFieldValidator>
                                                        <asp:RegularExpressionValidator ID="revPostCode" runat="server" CssClass="validationErrorControl"
                                                            Display="Dynamic" ErrorMessage="" ValidationGroup="proposal" ValidationExpression="[0-9]{6}"
                                                            ControlToValidate="txtPostCode"></asp:RegularExpressionValidator>
                                                    </div>
                                                    <div runat="server" visible="false" id="divAddressList">
                                                        <div class="h10">
                                                        </div>
                                                        <div class="w180 left align_right pad_6t pad_7xr">
                                                            Please choose your address
                                                        </div>
                                                        <asp:DropDownList ID="ddlAddressList" AutoPostBack="true" Width="320px" runat="server"
                                                            OnSelectedIndexChanged="ddlAddressList_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                    </div>
                                               <%-- </ContentTemplate>
                                            </asp:UpdatePanel>--%>
                                            <div class="h10">
                                            </div>
                                            <div id="divUnitNo">
                                                <div class="w180 left align_right pad_6t pad_7xr">
                                                    <span class="red">*</span> Unit Number:
                                                </div>
                                                <asp:TextBox ID="txtUnit1" MaxLength="10" runat="server" size="8"></asp:TextBox>-
                                                <asp:RequiredFieldValidator ID="rfvUnit1" runat="server" CssClass="validationErrorControl"
                                                    ErrorMessage="" ValidationGroup="proposal" ControlToValidate="txtUnit1"></asp:RequiredFieldValidator>
                                                <asp:TextBox ID="txtUnit2" MaxLength="10" runat="server" size="8"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="rfvUnit2" runat="server" CssClass="validationErrorControl"
                                                    ErrorMessage="" ValidationGroup="proposal" ControlToValidate="txtUnit2"></asp:RequiredFieldValidator>
                                            </div>
                                            <div class="h10">
                                            </div>
                                            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                                <ContentTemplate>
                                                    <div id="divPCAddress">
                                                        <div class="w180 left align_right pad_6t pad_7xr">
                                                            <span class="red">*</span> Address:
                                                        </div>
                                                        <span id="divAddress"></span>
                                                        <asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine" MaxLength="120"
                                                            Width="200px"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="rfvAddress" runat="server" CssClass="validationErrorControl"
                                                            ErrorMessage="" ValidationGroup="proposal" ControlToValidate="txtAddress"></asp:RequiredFieldValidator>
                                                    </div>
                                                </ContentTemplate>
                                            </asp:UpdatePanel>
                                            <div class="h10">
                                            </div>
                                        </div>
                                        <div class="clear">
                                        </div>
                                        <div class="h10">
                                        </div>
                                        <div style="border: 1px solid #ccc; width: 912px; background: #d2d2d2;">
                                            <div class="h10">
                                            </div>
                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                Contact Info:</div>
                                            <div id="divMobileNo" class="w190 note left">
                                                <span class="red">*</span> Mobile Number<br />
                                                <uc1:usrPhoneNo ID="txtMobileNo" IsEnabled="true" IsRequired="true" PhoneNoRequireErrorMessage="Require mobile number."
                                                    PhoneNoErrorMessage="Mobile phone number should 8 digits." PhoneNoValidErrorMessage="Invalid mobile phone number."
                                                    runat="server" ValidationGroup="proposal" />
                                            </div>
                                            <div id="divOfficePhoneNo" class="w190 note left">
                                                Home Number<br />
                                                <uc1:usrPhoneNo ID="txtHomePhoneNo" runat="server" ValidationGroup="proposal" IsRequired="False" />
                                            </div>
                                            <div id="div1" class="w190 note left">
                                                Office Number<br />
                                                <uc1:usrPhoneNo ID="txtOfficePhoneNo" runat="server" ValidationGroup="proposal" IsRequired="False" />
                                            </div>
                                            <div class="h10">
                                            </div>
                                        </div>
                                        <div style="display: none">
                                            <asp:TextBox ID="txtIsCover" runat="server"></asp:TextBox></div>
                                        <div style="display: none">
                                            <asp:TextBox ID="txtCHCount" runat="server"></asp:TextBox></div>
                                    </div>
                                    <div class="bottom">
                                    </div>
                                </div>
                                <div class="seperator">
                                </div>

                                <script type="text/javascript">
                                    IncreaseProgress(20);
                                </script>

                                <asp:Panel ID="pnlSpouse" runat="server" Width="100%">
                                    <div class="hilite" id="divSpouse">
                                        <div class="top">
                                        </div>
                                        <div class="body_in pad_15x">
                                            <h1>
                                                Spouse's Particulars</h1>
                                            <div class="seperator">
                                            </div>
                                            <div class="w43per left">
                                                <div id="divSpouseName">
                                                    <div class="w180 left align_right pad_6t pad_7xr">
                                                        <span class="red">*</span>Name:</div>
                                                    <div class="left">
                                                        <asp:TextBox ID="txtSpouseName" runat="server" MaxLength="50" size="25"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="rfvSpouseName" runat="server" CssClass="validationErrorControl"
                                                            ErrorMessage="" ValidationGroup="proposal" ControlToValidate="txtSpouseName"></asp:RequiredFieldValidator>
                                                        <asp:RegularExpressionValidator ID="revSpouseName" runat="server" ControlToValidate="txtSpouseName"
                                                            ValidationExpression="^[a-zA-Z''-'\s]{1,50}$" ValidationGroup="proposal" CssClass="validationErrorControl"
                                                            Text="" ErrorMessage=""></asp:RegularExpressionValidator>
                                                    </div>
                                                </div>
                                                <div class="h10">
                                                </div>
                                                <div id="divSpouseNRICNo">
                                                    <div class="w180 left align_right pad_6t pad_7xr">
                                                        <span class="red">*</span>NRIC Number:</div>
                                                    <div class="left">
                                                        <uc3:usrIdNumber ID="ddlSpouseIdNumber" runat="server" ValidationGroup="proposal" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="w56per left">
                                                <div id="divSpouseGender">
                                                    <div class="w180 left align_right pad_6t pad_7xr">
                                                        <span class="red">*</span> Gender:</div>
                                                    <div class="left">
                                                        <uc7:usrGender ID="ddlSpouseGender" ValidationGroup="proposal" ErrorMessage="" runat="server" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="bottom">
                                        </div>
                                    </div>
                                    <div class="seperator">
                                    </div>
                                </asp:Panel>
                                <asp:Panel ID="pnlChildParticulars" runat="server" Width="100%">
                                    <div class="hilite" id="divChilds">
                                        <div class="top">
                                        </div>
                                        <div class="body_in pad_15x">
                                            <h1>
                                                Child's Particulars</h1>
                                            <asp:Panel ID="pnlChild1" runat="server" Width="100%">
                                                <div class="seperator">
                                                </div>
                                                <div>
                                                    <h3>
                                                        Child 1</h3>
                                                    <div class="h10">
                                                    </div>
                                                    <div class="w43per left">
                                                        <div id="divChildName1">
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> Name:</div>
                                                            <div class="left pad_6t">
                                                                <asp:TextBox ID="txtChildName1" MaxLength="50" runat="server" Width="200px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvChildName1" runat="server" CssClass="validationErrorControl"
                                                                    ErrorMessage="" ValidationGroup="proposal" ControlToValidate="txtChildName1"></asp:RequiredFieldValidator>
                                                                <asp:RegularExpressionValidator ID="revChildName1" runat="server" ControlToValidate="txtChildName1"
                                                                    ValidationExpression="^[a-zA-Z''-'\s]{1,50}$" ValidationGroup="proposal" CssClass="validationErrorControl"
                                                                    Text="" ErrorMessage=""></asp:RegularExpressionValidator>
                                                            </div>
                                                        </div>
                                                        <div class="h10">
                                                        </div>
                                                        <div>
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> Date of Birth:</div>
                                                            <div class="left">
                                                                <uc2:usrDate ID="ddlChildDOB1" ValidationGroup="proposal" runat="server"></uc2:usrDate>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="w56per left">
                                                        <div>
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> NRIC Number:</div>
                                                            <div class="left">
                                                                <uc3:usrIdNumber ID="ddlChildIdNumber1" runat="server" ValidationGroup="proposal" />
                                                            </div>
                                                        </div>
                                                        <div class="h10">
                                                        </div>
                                                        <div>
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> Gender:</div>
                                                            <div class="left">
                                                                <uc7:usrGender ID="ddlChildGender1" ValidationGroup="proposal" IsEnabled="true" ErrorMessage=""
                                                                    runat="server" />
                                                            </div>
                                                        </div>
                                                        <div class="clear">
                                                        </div>
                                                    </div>
                                                </div>
                                            </asp:Panel>
                                            <asp:Panel ID="pnlChild2" runat="server" Width="100%">
                                                <div class="seperator">
                                                </div>
                                                <div>
                                                    <h3>
                                                        Child 2</h3>
                                                    <div class="h10">
                                                    </div>
                                                    <div class="w43per left">
                                                        <div id="divChildName2">
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> Name:</div>
                                                            <div class="left pad_6t">
                                                                <asp:TextBox ID="txtChildName2" MaxLength="50" runat="server" Width="200px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvChildName2" runat="server" CssClass="validationErrorControl"
                                                                    ErrorMessage="" ValidationGroup="proposal" ControlToValidate="txtChildName2"></asp:RequiredFieldValidator>
                                                                <asp:RegularExpressionValidator ID="revChildName2" runat="server" ControlToValidate="txtChildName2"
                                                                    ValidationExpression="^[a-zA-Z''-'\s]{1,50}$" ValidationGroup="proposal" CssClass="validationErrorControl"
                                                                    Text="" ErrorMessage=""></asp:RegularExpressionValidator>
                                                            </div>
                                                        </div>
                                                        <div class="h10">
                                                        </div>
                                                        <div>
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> Date of Birth:</div>
                                                            <div class="left">
                                                                <uc2:usrDate ID="ddlChildDOB2" ValidationGroup="proposal" runat="server"></uc2:usrDate>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="w56per left">
                                                        <div>
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> NRIC Number:</div>
                                                            <div class="left">
                                                                <uc3:usrIdNumber ID="ddlChildIdNumber2" runat="server" ValidationGroup="proposal" />
                                                            </div>
                                                        </div>
                                                        <div class="h10">
                                                        </div>
                                                        <div>
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> Gender:</div>
                                                            <div class="left">
                                                                <uc7:usrGender ID="ddlChildGender2" ValidationGroup="proposal" IsEnabled="true" ErrorMessage=""
                                                                    runat="server" />
                                                            </div>
                                                        </div>
                                                        <div class="clear">
                                                        </div>
                                                    </div>
                                                </div>
                                            </asp:Panel>
                                            <asp:Panel ID="pnlChild3" runat="server" Width="100%">
                                                <div class="seperator">
                                                </div>
                                                <div>
                                                    <h3>
                                                        Child 3</h3>
                                                    <div class="h10">
                                                    </div>
                                                    <div class="w43per left">
                                                        <div id="divChildName3">
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> Name:</div>
                                                            <div class="left pad_6t">
                                                                <asp:TextBox ID="txtChildName3" MaxLength="50" runat="server" Width="200px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvChildName3" runat="server" CssClass="validationErrorControl"
                                                                    ErrorMessage="" ValidationGroup="proposal" ControlToValidate="txtChildName3"></asp:RequiredFieldValidator>
                                                                <asp:RegularExpressionValidator ID="revChildName3" runat="server" ControlToValidate="txtChildName3"
                                                                    ValidationExpression="^[a-zA-Z''-'\s]{1,50}$" ValidationGroup="proposal" CssClass="validationErrorControl"
                                                                    Text="" ErrorMessage=""></asp:RegularExpressionValidator>
                                                            </div>
                                                        </div>
                                                        <div class="h10">
                                                        </div>
                                                        <div>
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> Date of Birth:</div>
                                                            <div class="left">
                                                                <uc2:usrDate ID="ddlChildDOB3" ValidationGroup="proposal" runat="server"></uc2:usrDate>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="w56per left">
                                                        <div>
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> NRIC Number:</div>
                                                            <div class="left">
                                                                <uc3:usrIdNumber ID="ddlChildIdNumber3" runat="server" ValidationGroup="proposal" />
                                                            </div>
                                                        </div>
                                                        <div class="h10">
                                                        </div>
                                                        <div>
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> Gender:</div>
                                                            <div class="left">
                                                                <uc7:usrGender ID="ddlChildGender3" ValidationGroup="proposal" IsEnabled="true" ErrorMessage=""
                                                                    runat="server" />
                                                            </div>
                                                        </div>
                                                        <div class="clear">
                                                        </div>
                                                    </div>
                                                </div>
                                            </asp:Panel>
                                            <asp:Panel ID="pnlChild4" runat="server" Width="100%">
                                                <div class="seperator">
                                                </div>
                                                <div>
                                                    <h3>
                                                        Child 4</h3>
                                                    <div class="h10">
                                                    </div>
                                                    <div class="w43per left">
                                                        <div id="divChildName4">
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> Name:</div>
                                                            <div class="left pad_6t">
                                                                <asp:TextBox ID="txtChildName4" MaxLength="50" runat="server" Width="200px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvChildName4" runat="server" CssClass="validationErrorControl"
                                                                    ErrorMessage="" ValidationGroup="proposal" ControlToValidate="txtChildName4"></asp:RequiredFieldValidator>
                                                                <asp:RegularExpressionValidator ID="revChildName4" runat="server" ControlToValidate="txtChildName4"
                                                                    ValidationExpression="^[a-zA-Z''-'\s]{1,50}$" ValidationGroup="proposal" CssClass="validationErrorControl"
                                                                    Text="" ErrorMessage=""></asp:RegularExpressionValidator>
                                                            </div>
                                                        </div>
                                                        <div class="h10">
                                                        </div>
                                                        <div>
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> Date of Birth:</div>
                                                            <div class="left">
                                                                <uc2:usrDate ID="ddlChildDOB4" ValidationGroup="proposal" runat="server"></uc2:usrDate>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="w56per left">
                                                        <div>
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> NRIC Number:</div>
                                                            <div class="left">
                                                                <uc3:usrIdNumber ID="ddlChildIdNumber4" runat="server" ValidationGroup="proposal" />
                                                            </div>
                                                        </div>
                                                        <div class="h10">
                                                        </div>
                                                        <div>
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> Gender:</div>
                                                            <div class="left">
                                                                <uc7:usrGender ID="ddlChildGender4" ValidationGroup="proposal" IsEnabled="true" ErrorMessage=""
                                                                    runat="server" />
                                                            </div>
                                                        </div>
                                                        <div class="clear">
                                                        </div>
                                                    </div>
                                                </div>
                                            </asp:Panel>
                                            <asp:Panel ID="pnlChild5" runat="server" Width="100%">
                                                <div class="seperator">
                                                </div>
                                                <div>
                                                    <h3>
                                                        Child 5</h3>
                                                    <div class="h10">
                                                    </div>
                                                    <div class="w43per left">
                                                        <div id="divChildName5">
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> Name:</div>
                                                            <div class="left pad_6t">
                                                                <asp:TextBox ID="txtChildName5" MaxLength="50" runat="server" Width="200px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvChildName5" runat="server" CssClass="validationErrorControl"
                                                                    ErrorMessage="" ValidationGroup="proposal" ControlToValidate="txtChildName5"></asp:RequiredFieldValidator>
                                                                <asp:RegularExpressionValidator ID="revChildName5" runat="server" ControlToValidate="txtChildName5"
                                                                    ValidationExpression="^[a-zA-Z''-'\s]{1,50}$" ValidationGroup="proposal" CssClass="validationErrorControl"
                                                                    Text="" ErrorMessage=""></asp:RegularExpressionValidator>
                                                            </div>
                                                        </div>
                                                        <div class="h10">
                                                        </div>
                                                        <div>
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> Date of Birth:</div>
                                                            <div class="left">
                                                                <uc2:usrDate ID="ddlChildDOB5" ValidationGroup="proposal" runat="server"></uc2:usrDate>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="w56per left">
                                                        <div>
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> NRIC Number:</div>
                                                            <div class="left">
                                                                <uc3:usrIdNumber ID="ddlChildIdNumber5" runat="server" ValidationGroup="proposal" />
                                                            </div>
                                                        </div>
                                                        <div class="h10">
                                                        </div>
                                                        <div>
                                                            <div class="w180 left align_right pad_6t pad_7xr">
                                                                <span class="red">*</span> Gender:</div>
                                                            <div class="left">
                                                                <uc7:usrGender ID="ddlChildGender5" ValidationGroup="proposal" IsEnabled="true" ErrorMessage=""
                                                                    runat="server" />
                                                            </div>
                                                        </div>
                                                        <div class="clear">
                                                        </div>
                                                    </div>
                                                </div>
                                            </asp:Panel>
                                        </div>
                                        <div class="bottom">
                                        </div>
                                    </div>
                                    <div class="seperator">
                                    </div>
                                </asp:Panel>

                                <script type="text/javascript">
                                    IncreaseProgress(45);
                                </script>

                                <div class="twoclmn" id="divOtherOnformationHeader">
                                    <div class="top">
                                    </div>
                                    <div class="body pad_15x" id="divOtherInfo">
                                        <h1>
                                            Datails on Occupation/Hobby/Insurance History</h1>
                                        <div class="seperator">
                                        </div>
                                        <div id="divOtherOnformation">
                                            <div id="divPhysicaldefectstatus" class="mar_10by">
                                                <div class="w650 left align_right pad_10xr">
                                                    <span class="red">*</span> 1. Have you suffered from any physical defect, infirmity
                                                    or congenital conditions?
                                                </div>
                                                <div class="w220 left pad_20_10x">
                                                    <span id="divYesPhysicaldefect">
                                                        <asp:RadioButton onclick="ShowHideDiv('divPhysicaldefect',true);ValPhysicaldefect(true);CheckPhysicaldefectValidationCss();"
                                                            ID="rdoYesPhysicaldefect" runat="server" GroupName="physicaldefect" />
                                                        <asp:Label ID="lblYesPhysicaldefect" class="pad_10xr" runat="server" Text="Yes"></asp:Label>
                                                    </span><span id="divNoPhysicaldefect">
                                                        <asp:RadioButton onclick="ShowHideDiv('divPhysicaldefect',false);ValPhysicaldefect(false);CheckPhysicaldefectValidationCss();"
                                                            ID="rdoNoPhysicaldefect" runat="server" GroupName="physicaldefect" />
                                                        <asp:Label ID="lblNoPhysicaldefect" runat="server" Text="No"></asp:Label>
                                                    </span>
                                                    <div style="display: none">
                                                        <asp:TextBox ID="txtPhysicaldefect" runat="server"></asp:TextBox>
                                                    </div>
                                                    <asp:RequiredFieldValidator ID="rfvPhysicaldefect" runat="server" CssClass="validationErrorControl"
                                                        Display="Dynamic" ErrorMessage="" ControlToValidate="txtPhysicaldefect" ValidationGroup="proposal"
                                                        Text=""></asp:RequiredFieldValidator>
                                                </div>
                                            </div>
                                            <div class="h7">
                                            </div>
                                            <div id="divPhysicaldefect" style="display: ;" class="mar_10by">
                                                <div class="w650 left align_right pad_10xr">
                                                    <span class="red">*</span> Please specify
                                                </div>
                                                <div class="w220 left pad_20_10x">
                                                    <asp:TextBox ID="txtPhysicaldefectReason" runat="server" Columns="25" MaxLength="100"
                                                        Rows="2" TextMode="MultiLine"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="rfvPhysicaldefectReason" ControlToValidate="txtPhysicaldefectReason"
                                                        ErrorMessage="" ValidationGroup="proposal" CssClass="validationErrorControl"
                                                        runat="server"></asp:RequiredFieldValidator>
                                                </div>
                                                <div class="h7">
                                                </div>
                                            </div>
                                            <div id="divHazadousHobbystatus" class="mar_10by">
                                                <div class="w650 left align_right pad_10xr">
                                                    <span class="red">*</span> 2. Do you or the person(s) to be insured engage in any
                                                    hazardous sports or activities that are likely to cause bodily injury?
                                                </div>
                                                <div class="w220 left pad_20_10x">
                                                    <span id="divYesHazadousHobby">
                                                        <asp:RadioButton onclick="ShowHideDiv('divHazadousHobby',true);ValHazadousHobby(true);CheckHazadousHobbyValidationCss();"
                                                            ID="rdoYesHazadousHobby" runat="server" GroupName="hazadoushobby" />
                                                        <asp:Label ID="lblYesHazadousHobby" class="pad_10xr" runat="server" Text="Yes"></asp:Label>
                                                    </span><span id="divNoHazadousHobby">
                                                        <asp:RadioButton onclick="ShowHideDiv('divHazadousHobby',false);ValHazadousHobby(false);CheckHazadousHobbyValidationCss();"
                                                            ID="rdoNoHazadousHobby" runat="server" GroupName="hazadoushobby" />
                                                        <asp:Label ID="lblNoHazadousHobby" runat="server" Text="No"></asp:Label>
                                                    </span>
                                                    <div style="display: none">
                                                        <asp:TextBox ID="txtHazadousHobby" runat="server"></asp:TextBox>
                                                    </div>
                                                    <asp:RequiredFieldValidator ID="rfvHazadousHobby" runat="server" CssClass="validationErrorControl"
                                                        Display="Dynamic" ErrorMessage="" ControlToValidate="txtHazadousHobby" ValidationGroup="proposal"
                                                        Text=""></asp:RequiredFieldValidator>
                                                </div>
                                            </div>
                                            <div class="h7">
                                            </div>
                                            <div id="divHazadousHobby" style="display: ;" class="mar_10by">
                                                <div class="w650 left align_right pad_10xr">
                                                    <span class="red">*</span> Please specify
                                                </div>
                                                <div class="w220 left pad_20_10x">
                                                    <asp:TextBox ID="txtHazadousHobbyReason" runat="server" Columns="25" MaxLength="100"
                                                        Rows="2" TextMode="MultiLine"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="rfvHazadousHobbyReason" ControlToValidate="txtHazadousHobbyReason"
                                                        ErrorMessage="" ValidationGroup="proposal" CssClass="validationErrorControl"
                                                        runat="server"></asp:RequiredFieldValidator>
                                                </div>
                                                <div class="h7">
                                                </div>
                                            </div>
                                            <div id="divInsuranceCancelledstatus" class="mar_10by">
                                                <div class="w650 left align_right pad_10xr">
                                                    <span class="red">*</span> 3. Have you ever had any medical/health or life Insurance
                                                    application declined, restricted or accepted at other than normal terms?
                                                </div>
                                                <div class="w220 left pad_20_10x">
                                                    <span id="divYesInsuranceCancelled">
                                                        <asp:RadioButton onclick="ShowHideDiv('divInsuranceCancelled',true);ValInsuranceCancelled(true);CheckInsuranceCancelledValidationCss();"
                                                            ID="rdoYesInsuranceCancelled" runat="server" GroupName="insurancecancelled" />
                                                        <asp:Label ID="lblYesInsuranceCancelled" class="pad_10xr" runat="server" Text="Yes"></asp:Label>
                                                    </span><span id="divNoInsuranceCancelled">
                                                        <asp:RadioButton onclick="ShowHideDiv('divInsuranceCancelled',false);ValInsuranceCancelled(false);CheckInsuranceCancelledValidationCss();"
                                                            ID="rdoNoInsuranceCancelled" runat="server" GroupName="insurancecancelled" />
                                                        <asp:Label ID="lblNoInsuranceCancelled" runat="server" Text="No"></asp:Label>
                                                    </span>
                                                    <div style="display: none">
                                                        <asp:TextBox ID="txtInsuranceCancelled" runat="server"></asp:TextBox>
                                                    </div>
                                                    <asp:RequiredFieldValidator ID="rfvInsuranceCancelled" runat="server" CssClass="validationErrorControl"
                                                        Display="Dynamic" ErrorMessage="" ControlToValidate="txtInsuranceCancelled" ValidationGroup="proposal"
                                                        Text=""></asp:RequiredFieldValidator>
                                                </div>
                                            </div>
                                            <div class="h7">
                                            </div>
                                            <div id="divInsuranceCancelled" style="display: " class="mar_10by">
                                                <div class="h7">
                                                </div>
                                                <div class="w650 left align_right pad_10xr">
                                                    <span class="red">*</span> Please Specify
                                                </div>
                                                <div class="w220 left pad_20_10x">
                                                    <asp:TextBox ID="txtInsuranceCancelledReason" runat="server" Columns="25" MaxLength="100"
                                                        Rows="2" TextMode="MultiLine"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="rfvInsuranceCancelledReason" ControlToValidate="txtInsuranceCancelledReason"
                                                        ErrorMessage="" ValidationGroup="proposal" CssClass="validationErrorControl"
                                                        runat="server"></asp:RequiredFieldValidator>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="clear">
                                        </div>
                                    </div>
                                    <div class="bottom">
                                    </div>
                                </div>
                                <div class="seperator">
                                </div>

                                <script type="text/javascript">
                                    IncreaseProgress(65);
                                </script>

                                <div class="seperator">
                                </div>
                                <div class="norm" id="divDeclaration">
                                    <div class="top">
                                    </div>
                                    <div class="body">
                                        <div class="pad_15x">
                                            <h1>
                                                Declaration</h1>
                                            <div class="seperator">
                                            </div>
                                            <p>
                                                I/We hereby declare that the person(s) to be insured are in good health and free
                                                from physical or mental defect or infirmity or disease.<br />
                                                <br />
                                                I/We warrant that the answers given above are true and correct and I/we have not
                                                withheld any information likely to affect acceptance of this Proposal.<br />
                                                <br />
                                                I/We agree that this Proposal shall be the basis of the Contract between me/us and
                                                the Company and I/we further agree to accept the Company's policy subject to the
                                                terms exclusions and conditions expressed therein, endorsed thereon or attached
                                                thereto.<br />
                                            </p>
                                        </div>
                                    </div>
                                    <div class="bottom">
                                    </div>
                                </div>
                                <div class="seperator">
                                </div>
                                <div class="center align_center" id="divFormButtons">
                                    <asp:ImageButton ID="ibtSubmit" OnClientClick="LoadValidationErrorCss();CheckOptionValidationCss();"
                                        runat="server" ValidationGroup="proposal" ImageUrl="~/images/forms_proposal/button/submit.png"
                                        class="button" AlternateText="Submit Query" OnClick="ibtSubmit_Click" />
                                    <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
                                    <div class="note">
                                        <img src="/images/forms_proposal/icon/warning.png" width="21" height="18" alt="Note"
                                            style="vertical-align: middle; padding-bottom: 3px" />
                                        <strong>Note</strong>, by clicking on the SUBMIT button you agree to our Website's
                                        <a href="../../terms/terms.aspx" target="_blank">Terms &amp; Conditions</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="bottom">
                        </div>
                    </div>
                </div>
                <div class="seperator">
                </div>
            </div>
        </div>
    </div>
    <div id="footer">
        <div id="nav_bottom" class="pad_7t">
            <div class="left pad_8yr">
                <%--<a href="/personal-accident/results.aspx" onclick="return confirm('Are you sure to go back?');">
                    <img src="/images/forms_proposal/button/back.png" alt="Back" /></a>--%>
                     <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="/images/forms_proposal/button/back.png"
                    OnClick="imgbtnBackTop_Click" OnClientClick="return confirm('Are you sure to go back?');" />
            </div>
            <div class="right pad_8yr">
                <a href="#" onclick="window.print()">
                    <img src="/images/forms_proposal/button/print.png" alt="Print" /></a>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        IncreaseProgress(85);
    </script>

    <script type="text/javascript">

        function ShowHideDiv(divName, varOnOff) {
            if (varOnOff) {
                document.getElementById(divName).style.display = "";
            }
            else {
                document.getElementById(divName).style.display = "none";
            }
        }


        function CheckOptionValidationCss() {
            CheckHazadousHobbyValidationCss();
            CheckPhysicaldefectValidationCss();
            CheckInsuranceCancelledValidationCss();

        }

        function CheckValidationCss(divYes, divNo, ctrlText, valCtrl) {
            ShowValidationEffectOption(divYes, divNo, ctrlText, valCtrl);
            return true;
        }

        function CheckValidationCssThree(div1, div2, div3, ctrlText, valCtrl) {
            ShowValidationEffectOptionThree(div1, div2, div3, ctrlText, valCtrl);
            return true;
        }

        function CheckHazadousHobbyValidationCss() {
            CheckValidationCss('divYesHazadousHobby', 'divNoHazadousHobby', '<%=txtHazadousHobby.ClientID%>', '<%=rfvHazadousHobby.ClientID%>');
        }

        function ValHazadousHobby(varOnOff) {
            var txtCtrl = document.getElementById("<%=txtHazadousHobby.ClientID%>");
            txtCtrl.value = "1";

            ValidatorEnable(document.getElementById('<%=rfvHazadousHobbyReason.ClientID%>'), varOnOff);
        }

        function CheckPhysicaldefectValidationCss() {
            CheckValidationCss('divYesPhysicaldefect', 'divNoPhysicaldefect', '<%=txtPhysicaldefect.ClientID%>', '<%=rfvPhysicaldefect.ClientID%>');
        }

        function ValPhysicaldefect(varOnOff) {
            var txtCtrl = document.getElementById("<%=txtPhysicaldefect.ClientID%>");
            txtCtrl.value = "1";

            ValidatorEnable(document.getElementById('<%=rfvPhysicaldefectReason.ClientID%>'), varOnOff);
        }

        function CheckInsuranceCancelledValidationCss() {
            CheckValidationCss('divYesInsuranceCancelled', 'divNoInsuranceCancelled', '<%=txtInsuranceCancelled.ClientID%>', '<%=rfvInsuranceCancelled.ClientID%>');
        }

        function ValInsuranceCancelled(varOnOff) {
            var txtCtrl = document.getElementById("<%=txtInsuranceCancelled.ClientID%>");
            txtCtrl.value = "1";

            ValidatorEnable(document.getElementById('<%=rfvInsuranceCancelledReason.ClientID%>'), varOnOff);
        }





        function Check2NRICValid(source, arguments) {
            var ddlnricpref = document.getElementById('<%=ddlIdNumber.ClientID%>' + '_ddlIdPrefix');
            var txtnricnum = document.getElementById('<%=ddlIdNumber.ClientID%>' + '_txtIdNumber');
            var ddlnricsuffix = document.getElementById('<%=ddlIdNumber.ClientID%>' + '_ddlIdPostfix');
            var applicantNRIC = ddlnricpref.value + txtnricnum.value + ddlnricsuffix.value;

            var ddlspousenricpref = document.getElementById('<%=ddlSpouseIdNumber.ClientID%>' + '_ddlIdPrefix');
            var txtspousenricnum = document.getElementById('<%=ddlSpouseIdNumber.ClientID%>' + '_txtIdNumber');
            var ddlspousenricsuffix = document.getElementById('<%=ddlSpouseIdNumber.ClientID%>' + '_ddlIdPostfix');
            var spouseNRIC = ddlspousenricpref.value + txtspousenricnum.value + ddlspousenricsuffix.value;

            var result = true;

            //alert(applicantNRIC + ' ' + spouseNRIC);

            if (applicantNRIC == spouseNRIC) {
                result = false;
            }
            else {
                result = true;
            }

            if (result == false) {
                ddlnricpref.style.backgroundColor = '#fcc';
                ddlnricpref.style.border = 'Solid 1px #f00';
                txtnricnum.style.backgroundColor = '#fcc';
                txtnricnum.style.border = 'Solid 1px #f00';
                ddlnricsuffix.style.backgroundColor = '#fcc';
                ddlnricsuffix.style.border = 'Solid 1px #f00';

                ddlspousenricpref.style.backgroundColor = '#fcc';
                ddlspousenricpref.style.border = 'Solid 1px #f00';
                txtspousenricnum.style.backgroundColor = '#fcc';
                txtspousenricnum.style.border = 'Solid 1px #f00';
                ddlspousenricsuffix.style.backgroundColor = '#fcc';
                ddlspousenricsuffix.style.border = 'Solid 1px #f00';
            }
            else {
                ddlnricpref.style.backgroundColor = '';
                ddlnricpref.style.border = '';
                txtnricnum.style.backgroundColor = '';
                txtnricnum.style.border = '';
                ddlnricsuffix.style.backgroundColor = '';
                ddlnricsuffix.style.border = '';

                ddlspousenricpref.style.backgroundColor = '';
                ddlspousenricpref.style.border = '';
                txtspousenricnum.style.backgroundColor = '';
                txtspousenricnum.style.border = '';
                ddlspousenricsuffix.style.backgroundColor = '';
                ddlspousenricsuffix.style.border = '';
            }
            arguments.IsValid = result;
        }

        var hookCompareVal = false;
        function HookCompareICValidation() {
            //            if (hookCompareVal == false) {
            //                prefix = "<%=ddlIdNumber.ClientID%>";
            //                var ddlnricpref = prefix + "_ddlIdPrefix";
            //                var txtnricnum = prefix + "_txtIdNumber";
            //                var ddlnricsuffix = prefix + "_ddlIdPostfix";
            //                
            //                prefix = "<%=ddlSpouseIdNumber.ClientID%>";
            //                var ddlspousenricpref = prefix + "_ddlIdPrefix";
            //                var txtspousenricnum = prefix + "_txtIdNumber";
            //                var ddlspousenricsuffix = prefix + "_ddlIdPostfix";
            //                var valCtrl = "<=csvNRIC.ClientID>";

            //                ValidatorHookupControlID(ddlnricpref, document.getElementById(valCtrl));
            //                ValidatorHookupControlID(txtnricnum, document.getElementById(valCtrl));
            //                ValidatorHookupControlID(ddlnricsuffix, document.getElementById(valCtrl));
            //                ValidatorHookupControlID(ddlspousenricpref, document.getElementById(valCtrl));
            //                ValidatorHookupControlID(txtspousenricnum, document.getElementById(valCtrl));
            //                ValidatorHookupControlID(ddlspousenricsuffix, document.getElementById(valCtrl));
            hookCompareVal = true;
            //            }
        }

        //    function EnableDisableValidations() 
        //    {
        //        var policytype = document.getElementById('<%=txtIsCover.ClientID%>').value;
        //        if (policytype == 'IND') 
        //        {
        //            ValidationSpouse(false);
        //            ValidationChild1(false);
        //            ValidationChild2(false);
        //            ValidationChild3(false);
        //            ValidationChild4(false);
        //            ValidationChild5(false);
        //        }
        //        else if (policytype == 'INDSP') 
        //        {
        //            ValidationSpouse(true);
        //            ValidationChild1(false);
        //            ValidationChild2(false);
        //            ValidationChild3(false);
        //            ValidationChild4(false);
        //            ValidationChild5(false);
        //        }
        //        else if (policytype == 'INDCHD') 
        //        {
        //            ValidationSpouse(false);
        //            EnableDisableChildValidations(); 
        //        }
        //        else 
        //        {
        //            ValidationSpouse(true);
        //            EnableDisableChildValidations(); 
        //        }
        //    }
        //    function EnableDisableChildValidations() 
        //    {
        //        var childcount = document.getElementById('<%=txtCHCount.ClientID%>').value;
        //        if (childcount == 1) {
        //            ValidationChild1(true);
        //            ValidationChild2(false);
        //            ValidationChild3(false);
        //            ValidationChild4(false);
        //            ValidationChild5(false);
        //        }
        //        else if (childcount == 2) {
        //            ValidationChild1(true);
        //            ValidationChild2(true);
        //            ValidationChild3(false);
        //            ValidationChild4(false);
        //            ValidationChild5(false);
        //        }
        //        else if (childcount == 3) {
        //            ValidationChild1(true);
        //            ValidationChild2(true);
        //            ValidationChild3(true);
        //            ValidationChild4(false);
        //            ValidationChild5(false);
        //        }
        //        else if (childcount == 4) {
        //            ValidationChild1(true);
        //            ValidationChild2(true);
        //            ValidationChild3(true);
        //            ValidationChild4(true);
        //            ValidationChild5(false);
        //        }
        //        else if (childcount == 5) {
        //            ValidationChild1(true);
        //            ValidationChild2(true);
        //            ValidationChild3(true);
        //            ValidationChild4(true);
        //            ValidationChild5(true);
        //        }
        //    }

        //    function ValidationSpouse(varOnOff) 
        //    {
        //        ValidatorEnable(document.getElementById('<%=rfvSpouseName.ClientID%>'), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=revSpouseName.ClientID%>'), varOnOff);
        //        ValidatorEnable(document.getElementById('<=ddlSpouseGender.ClientI%>' + "_rfvGender"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlSpouseIdNumber.ClientID%>' + "_csvIdPrefix"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlSpouseIdNumber.ClientID%>' + "_rfvIdNumber"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlSpouseIdNumber.ClientID%>' + "_revIdNumberLength"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlSpouseIdNumber.ClientID%>' + "_csvIdNumber"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlSpouseIdNumber.ClientID%>' + "_csvIdPostfix"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlNationality.ClientID%>' + "_rfvNationality"), varOnOff);
        //        ValidatorEnable(document.getElementById('<=ddlSpouseRelationship.ClientID>' + "_rfvRelationship"), varOnOff);
        //    }

        //    function ValidationChild1(varOnOff) {
        //        ValidatorEnable(document.getElementById('<%=rfvChildName1.ClientID%>'), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=revChildName1.ClientID%>'), varOnOff);
        //        IsEnableDateValidation('<%=ddlChildDOB1.ClientID%>', varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildGender1.ClientID%>' + "_rfvGender"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber1.ClientID%>' + "_csvIdPrefix"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber1.ClientID%>' + "_rfvIdNumber"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber1.ClientID%>' + "_revIdNumberLength"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber1.ClientID%>' + "_csvIdNumber"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber1.ClientID%>' + "_csvIdPostfix"), varOnOff);
        //        ValidatorEnable(document.getElementById('<=ddlChildNationality1.ClientID>' + "_rfvNationality"), varOnOff);
        //        ValidatorEnable(document.getElementById('<=ddlChildRelationship1.ClientID>' + "_rfvRelationship"), varOnOff);
        //    }

        //    function ValidationChild2(varOnOff) {
        //        ValidatorEnable(document.getElementById('<%=rfvChildName2.ClientID%>'), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=revChildName2.ClientID%>'), varOnOff);
        //        IsEnableDateValidation('<%=ddlChildDOB2.ClientID%>', varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildGender2.ClientID%>' + "_rfvGender"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber2.ClientID%>' + "_csvIdPrefix"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber2.ClientID%>' + "_rfvIdNumber"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber2.ClientID%>' + "_revIdNumberLength"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber2.ClientID%>' + "_csvIdNumber"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber2.ClientID%>' + "_csvIdPostfix"), varOnOff);
        //        ValidatorEnable(document.getElementById('<=ddlChildNationality2.ClientID>' + "_rfvNationality"), varOnOff);
        //        ValidatorEnable(document.getElementById('<=ddlChildRelationship2.ClientID>' + "_rfvRelationship"), varOnOff);
        //    }

        //    function ValidationChild3(varOnOff) {
        //        ValidatorEnable(document.getElementById('<%=rfvChildName3.ClientID%>'), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=revChildName3.ClientID%>'), varOnOff);
        //        IsEnableDateValidation('<%=ddlChildDOB3.ClientID%>', varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildGender3.ClientID%>' + "_rfvGender"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber3.ClientID%>' + "_csvIdPrefix"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber3.ClientID%>' + "_rfvIdNumber"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber3.ClientID%>' + "_revIdNumberLength"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber3.ClientID%>' + "_csvIdNumber"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber3.ClientID%>' + "_csvIdPostfix"), varOnOff);
        //        ValidatorEnable(document.getElementById('<=ddlChildNationality3.ClientID>' + "_rfvNationality"), varOnOff);
        //        ValidatorEnable(document.getElementById('<=ddlChildRelationship3.ClientID>' + "_rfvRelationship"), varOnOff);
        //    }

        //    function ValidationChild4(varOnOff) {
        //        ValidatorEnable(document.getElementById('<%=rfvChildName4.ClientID%>'), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=revChildName4.ClientID%>'), varOnOff);
        //        IsEnableDateValidation('<%=ddlChildDOB4.ClientID%>', varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildGender4.ClientID%>' + "_rfvGender"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber4.ClientID%>' + "_csvIdPrefix"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber4.ClientID%>' + "_rfvIdNumber"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber4.ClientID%>' + "_revIdNumberLength"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber4.ClientID%>' + "_csvIdNumber"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber4.ClientID%>' + "_csvIdPostfix"), varOnOff);
        //        ValidatorEnable(document.getElementById('<=ddlChildNationality4.ClientID>' + "_rfvNationality"), varOnOff);
        //        ValidatorEnable(document.getElementById('<=ddlChildRelationship4.ClientID>' + "_rfvRelationship"), varOnOff);
        //    }

        //    function ValidationChild5(varOnOff) {
        //        ValidatorEnable(document.getElementById('<%=rfvChildName5.ClientID%>'), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=revChildName5.ClientID%>'), varOnOff);
        //        IsEnableDateValidation('<%=ddlChildDOB5.ClientID%>', varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildGender5.ClientID%>' + "_rfvGender"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber5.ClientID%>' + "_csvIdPrefix"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber5.ClientID%>' + "_rfvIdNumber"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber5.ClientID%>' + "_revIdNumberLength"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber5.ClientID%>' + "_csvIdNumber"), varOnOff);
        //        ValidatorEnable(document.getElementById('<%=ddlChildIdNumber5.ClientID%>' + "_csvIdPostfix"), varOnOff);
        //        ValidatorEnable(document.getElementById('<=ddlChildNationality5.ClientID>' + "_rfvNationality"), varOnOff);
        //        ValidatorEnable(document.getElementById('<=ddlChildRelationship5.ClientID>' + "_rfvRelationship"), varOnOff);
        //    }

        function CheckAll() {
            //HookSalValidation();
            HookCompareICValidation();
        }
        function showhide(el) {

            el = document.getElementById(el);
            el.style.display = (el.style.display == "none") ? "block" : "none";

        }

        window.onload = function() {
            showhide('divHazadousHobby');
            showhide('divPhysicaldefect');
            showhide('divInsuranceCancelled');

            if (document.getElementById('<%=rdoNoHazadousHobby.ClientID%>').checked == true) {
                ShowHideDiv('divHazadousHobby', false);
                ValHazadousHobby(false);
            }
            else { ShowHideDiv('divHazadousHobby', false); }

            if (document.getElementById('<%=rdoYesPhysicaldefect.ClientID%>').checked == true) {
                ShowHideDiv('divPhysicaldefect', true);
                ValPhysicaldefect(true);
            }
            else if (document.getElementById('<%=rdoNoPhysicaldefect.ClientID%>').checked == true) {
                ShowHideDiv('divPhysicaldefect', false);
                ValPhysicaldefect(false);
            }
            else { ShowHideDiv('divPhysicaldefect', false); }

            if (document.getElementById('<%=rdoYesInsuranceCancelled.ClientID%>').checked == true) {
                ShowHideDiv('divInsuranceCancelled', true);
                ValInsuranceCancelled(true);
            }
            else if (document.getElementById('<%=rdoNoInsuranceCancelled.ClientID%>').checked == true) {
                ShowHideDiv('divInsuranceCancelled', false);
                ValInsuranceCancelled(false);
            }
            else { ShowHideDiv('divInsuranceCancelled', false); }
        }


        function restrictToNumbers(e) {
            if ([e.keyCode || e.which] == 8 || [e.keyCode || e.which] == 37 || [e.keyCode || e.which] == 9 || [e.keyCode || e.which] == 39) //this is to allow backspace
                return true;

            if ([e.keyCode || e.which] < 48 || [e.keyCode || e.which] > 57)
                e.preventDefault ? e.preventDefault() : e.returnValue = false;
        }

        function requestByPostCode() {
            try {
                var _pcode = document.getElementById('<%=txtPostCode.ClientID%>').value;
                if (_pcode.length != 6) {
                    alert('Postal code length must be 6 numbers value.');
                    document.getElementById('<%=txtAddress.ClientID%>').value = '';
                    return false;
                }
                else {
                    requestData(_pcode);
                }
            }
            catch (e) {
                alert(e.toString());
            }
        }


        function set_data(json) {
            try {
                var srcTable = $("#divAddress").empty();
                var txtAddress = document.getElementById('<%=txtAddress.ClientID%>');
                if (json == null) {
                    $("<table><tr><td>No address found!</td></tr></table>").appendTo(srcTable);
                    alert("No address found!");
                    document.getElementById('<%=txtPostCode.ClientID%>').value = "";
                    txtAddress.value = "No Address found.";
                    return;
                }
                if (json.length == 0) {
                    $("<table><tr><td>No address found!</td></tr></table>").appendTo(srcTable);
                    alert("No address found!");
                    document.getElementById('<%=txtPostCode.ClientID%>').value = "";
                    txtAddress.value = "No Address found.";
                    return;
                }

                var tbl = $("<table width='50%'>");

                var tbody = $("<tbody>");
                var no = 1;
                for (var i = 0; i < json.length; i++) {
                    var trow = $("<tr>"), rec = json[i];
                    if (rec.t != null) {

                        var ctn = rec.t + "<br>" + rec.a;

                        //$("<td>").text(no).data("col", 1).appendTo(trow);
                        $("<td>").html(ctn).data("col", 2).appendTo(trow);
                        if (i == 0) {
                            txtAddress.value = rec.t + "\n" + rec.a;
                        }
                        else {
                            txtAddress.value += "\n\n" + rec.t + "\n" + rec.a;
                        }
                        no++;
                    }
                    trow.appendTo(tbody);
                }
                tbody.appendTo(tbl);
                //alert(srcTable);
                tbl.appendTo(srcTable);
            }
            catch (e) {
                alert(e.toString());
            }
        }

        function PostCodeChange() {
            document.getElementById('divAddress').innerHTML = "Your postcode changed.";
            document.getElementById('divAddress').style.display = 'none';
            document.getElementById('<%=txtAddress.ClientID%>').innerHTML = "Your postcode changed.\nGetting address from street directory...";
        }
    </script>

    <script type="text/javascript">
        IncreaseProgress(100);
        HideLoading();
    </script>
  <script src="../../includes/personalaccident/etiqa.proposalform.js" type="text/javascript"></script>
</asp:Content>
